﻿<%@ Page Title="" Language="C#" MasterPageFile="~/skin.Master" AutoEventWireup="true" CodeBehind="admin.aspx.cs" Inherits="DataShow.forecasters.admin" %>


<asp:Content ID="headers" ContentPlaceHolderID="home_header" runat="server">
    <link rel="stylesheet" href="/css/compiled/form-showcase.css" type="text/css" media="screen" />

    <link href="/css/lib/bootstrap.datepicker.css" type="text/css" rel="stylesheet" />
    <link href="/fileupload/uploadify.css" rel="stylesheet" />
    <style type="text/css">
        label {
            display:inline-block;padding-bottom:5px;
        }
        .marginb {
            margin-bottom:10px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="cph_home" runat="server">
    <asp:Label runat="server" ID="lbl_fid" Visible="false" />
    <div style="margin-top: 10px;">
        <ul class="breadcrumb">
            <li><a href="/Index.aspx">首页</a> <span class="divider">/</span></li>
            <li class="active">预报员管理</li>
        </ul>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>新增/编辑预报员</h5>
                </div>
                <div class="widget-content nopadding">
                   <label>用户名:</label> <asp:TextBox runat="server" ID="txt_username" Width="100" />
                    <label>密码:</label><asp:TextBox runat="server" ID="txt_password" Width="100" />
                    <label>是否现在激活</label><asp:CheckBox runat="server" ID="cbx_active" CssClass="cbx" />
                    <label>姓名:</label><asp:TextBox runat="server" ID="txt_name" Width="100" />
                    <label>性别:</label><asp:DropDownList runat="server" ID="ddl_gender" style="margin-bottom:10px;">
                        <asp:ListItem Text="男" Value="M" />
                        <asp:ListItem Text="女" Value="W" />
                    </asp:DropDownList>
                    <label>生日:</label><asp:TextBox runat="server" ID="txt_birthday" Width="100" CssClass="datepicker" />
                    <label>是否是管理员:</label><asp:CheckBox runat="server" ID="cbx_isadmin" CssClass="cbx" />
                    <label>预报员号码:</label><asp:TextBox runat="server" ID="txt_forecasterID" Width="100" />
                    <asp:Button runat="server" ID="btn_add" CssClass="btn-primary btn" OnClick="btn_add_Click" Text="添加" />
                </div>
            </div>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>功能栏</h5>
                </div>
                <div class="widget-content nopadding">
                    <asp:Button runat="server" ID="btn_search_all" Text="查询" CssClass="btn-primary btn" OnClick="btn_search_all_Click" />
                    <asp:Button runat="server" ID="btn_delete" Text="删除选中" CssClass="btn-primary btn" OnClick="btn_delete_Click" />
                    <asp:Button runat="server" ID="btn_update" Text="更新选中" CssClass="btn-primary btn" OnClick="btn_update_Click" />
                    <asp:Button runat="server" ID="btn_check_all" Text="全选" CssClass="btn-primary btn" OnClick="btn_check_all_Click" />
                </div>
            </div>
        </div>

    </div>
    <input type="hidden" runat="server" id="fid" />
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box" style="margin-top: 0">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>搜索结果</h5>
                </div>
                <div class="widget-content nopadding">
                    <asp:GridView ID="gv_result" runat="server" AutoGenerateColumns="False" BorderWidth="0" EmptyDataText="暂无排班表" CssClass="table" GridLines="None">
                        <Columns>
                            <asp:TemplateField HeaderText="ID" HeaderStyle-CssClass="w15" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="ID" runat="server" Text='<%#Eval("id") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="选择">
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="Select" Checked="false" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="用户名">
                                <ItemTemplate>
                                    <asp:Label ID="username" runat="server" Text='<%#Eval("username") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="密码" HeaderStyle-CssClass="w15">
                                <ItemTemplate>
                                    <asp:Label ID="pasw" runat="server" Text='<%#Eval("password") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="是否激活" HeaderStyle-CssClass="w15">
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="cbx_active" Checked='<%#Eval("is_active") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="姓名" HeaderStyle-CssClass="w15">
                                <ItemTemplate>
                                    <asp:Label ID="name" runat="server"><%#Eval("name") %></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="性别" HeaderStyle-CssClass="w10">
                                <ItemTemplate>
                                    <asp:Label ID="gender" runat="server"><%#Eval("sex").ToString()=="W"?"女":"男" %></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="生日" HeaderStyle-CssClass="w20">
                                <ItemTemplate>
                                    <asp:Label ID="labSendPoint" runat="server"><%#Eval("birth") %></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="是否为预报员" HeaderStyle-CssClass="w40">
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="cbx_isf" Checked='<%#(Eval("is_forcaster")) %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="预报员编号" HeaderStyle-CssClass="w40">
                                <ItemTemplate>
                                    <asp:Label ID="labEID" runat="server"><%#Eval("forcaster_number" )%></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="编辑" HeaderStyle-CssClass="w40">
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ID="lb_edit" Text="修改" CommandArgument='<%#Eval("id") %>' OnClick="lb_edit_Click" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>

                </div>
            </div>
        </div>

    </div>
    <!-- Modal -->
    <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">编辑预报员</h3>
        </div>
        <div class="modal-body">
            <div class="control-group">
                <!-- Text input-->
                <label class="control-label" for="input01">用户名</label>
                <div class="controls">
                    <input type="text" placeholder="" class="input-xlarge">
                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">
                <!-- Text input-->
                <label class="control-label" for="input01">密码</label>
                <div class="controls">
                    <input type="text" placeholder="" class="input-xlarge">
                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">是否激活</label>
                <div class="controls">
                    <!-- Multiple Radios -->
                    <label class="radio">
                        <input type="radio" value="是" name="active" checked="checked">
                        是
                    </label>
                    <label class="radio">
                        <input type="radio" value="否" name="active">
                        否
                    </label>
                </div>
            </div>
            <div class="control-group">
                <!-- Text input-->
                <label class="control-label" for="input01">姓名</label>
                <div class="controls">
                    <input type="text" placeholder="" class="input-xlarge">
                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">
                <!-- Select Basic -->
                <label class="control-label">性别</label>
                <div class="controls">
                    <select class="input-xlarge">
                        <option>男</option>
                        <option>女</option>
                    </select>
                </div>
            </div>
            <div class="control-group">
                <!-- Text input-->
                <label class="control-label" for="input01">生日</label>
                <div class="controls">
                    <input type="text" placeholder="" class="input-xlarge">
                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">是否为预报员</label>
                <div class="controls">
                    <!-- Multiple Radios -->
                    <label class="radio">
                        <input type="radio" value="是" name="isf" checked="checked">
                        是
                    </label>
                    <label class="radio">
                        <input type="radio" value="否" name="isf">
                        否
                    </label>
                </div>
            </div>
            <div class="control-group">
                <!-- Text input-->
                <label class="control-label" for="input01">预报员编号</label>
                <div class="controls">
                    <input type="text" placeholder="" class="input-xlarge">
                    <p class="help-block"></p>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
            <button class="btn btn-primary">Save changes</button>
        </div>
    </div>

</asp:Content>
<asp:Content runat="server" ID="scripts" ContentPlaceHolderID="home_script">
    <script src="/js/bootstrap.datepicker.js"></script>
    <script type="text/javascript">
        // datepicker plugin
        $('.datepicker').datepicker({ format: 'yyyy-mm-dd' }).on('changeDate', function (ev) {
            $(this).datepicker('hide');
        });
        //编辑按钮
        $(".btn_edit").click(function () {
            var fid = $(this).data("fid");
            $('#myModal').modal('show');
        })
        $(function () {
            $(".cbx").children().css('margin-bottom', '10px');
        })
    </script>
</asp:Content>
